package com.mmm.common.utils;

import com.mmm.common.vo.Paging;

import java.util.List;

/**
 * @email 1067559930@qq.com
 * @author: One
 * @date: 2022/03/03
 * @time: 19:30
 */
public class CommonUtils {

    public static <T> Paging<T> pageList(Integer totalPage, Integer page, Integer size, List<T> tList) {
        Long total = Long.valueOf(size > totalPage ? totalPage : size);
        return new Paging<T>(total,Long.valueOf(totalPage),page,size,tList);
    }

}
